﻿namespace KinonekoSoftware.Studio.Galleries
{
    partial class InstanceGalleryViewModel
    {
        private SortBy        _sortBy;
        private string        _searchBy;
        private int           _pageBy;
        private GalleryFilter _filter;
        
        private void Repage()
        {

        }

        private void OnFilterChanged(GalleryFilter oldValue, GalleryFilter newValue)
        {
            
            if (newValue is null)
            {
                return;
            }
        }


        public ObservableCollection<GalleryFilter> Filters { get; }
        
        public GalleryFilter Filter
        {
            get => _filter;
            set
            {
                OnFilterChanged(_filter, value);
                SetValue(ref _filter, value);
            }
        }

        public int PageBy
        {
            get => _pageBy;
            set => SetValue(ref _pageBy, value);
        }
        
        
        public string SearchBy
        {
            get => _searchBy;
            set => SetValue(ref _searchBy, value);
        }
        
        
        public SortBy SortBy
        {
            get => _sortBy;
            set
            {
                SetValue(ref _sortBy, value);
                OnSortByChanged();
            }
        }
    }
}